#ifndef __NETWORK_PANEL_WAN__H__
#define __NETWORK_PANEL_WAN__H__

#include "etc/network/networkconfig.h"

// #define GATEWAY_WIRED_CONFIG GATEWAY_OS_NETWORK_INTERFACE_WAN
// #define wan "docs/gateway-fs/etc/network/interfaces.d/ipv4/wan"
// #define GATEWAY_WIRED_WAN_CONFIG wan
#define GATEWAY_WIRED_WAN_CONFIG LINUX_OS_NETWORK_INTERFACE_WAN

#define WAN_IFACE "eth0"
#define LAN_IFACE "eth1"

// iface <iface> CTYPE WTYPE
#define NET_IFACE_ATTR_WORK_DHCP      "dhcp"
#define NET_IFACE_ATTR_WORK_STATIC    "static"
#define NET_IFACE_ATTR_WORK_MANUAL    "manual"

#define NET_IFACE_PROP_ADDRESS "address"
#define NET_IFACE_PROP_NETMASK "netmask"
#define NET_IFACE_PROP_GATEWAY "gateway"
#define NET_IFACE_PROP_DNS     "dns-nameserver"

// 获取连接状态, ip地址，掩码，网关
bool GetConnectStatus(char *dev);

// bool WirdS
bool WiredSetDynamic();
bool WiredSetStatic();
bool WiredSetManual();

bool WiredSet(char *address, char *netmask, char *gateway, char *dnsaddress);

// 设置IP
bool WiredSetAddress(char *address);
// 设置掩码
bool WiredSetNetmaskAddress(char *address);
// 设置网关
bool WiredSetGatewayAddress(char *address);
// 设置DNS
bool WiredSetDnsAddress(char *address);

#endif  //!__NETWORK_PANEL_WAN__H__